This invention generally relates to oscillator circuits and, in particular, to an RC oscillator circuit for oscillating at a predetermined frequency by accurately oscillating between two precise voltage levels and having negligible temperature or power supply variation effects.
Oscillator circuits are used in a myriad of applications in the electronics industry for providing clock and other timing signals to electronic circuitry such as microprocessors, microcontrollers, flip-flop circuits, latch circuits, etc. RC oscillator circuits typically include a control circuit coupled to the interconnection between a series resistor-capacitor (RC) network. The control circuit alternately charges or discharges the voltage across the capacitor through the resistor to generate an oscillatory signal appearing across the capacitor. The frequency of oscillation is determined by the time constant of the resistor and capacitor.
One technique for building an RC oscillator is to use a conventional NE555 timer (the 555 timer), manufactured by National Semiconductor, as the circuit that controls the charging and discharging of the capacitor of the RC network. The 555 timer includes a set/reset (SR) flip-flop and first and second comparators. The interconnection between the series RC network is coupled to one input of each of the comparators. The other input of the first comparator is coupled to receive a high threshold voltage (V.sub.H) while the other input of the second comparator is coupled to receive a low threshold voltage (V.sub.L). The output of first comparator is coupled to the set input of the flip-flop while the output of the second comparator is coupled to the reset input of the flip-flop. An output of the flip-flop is coupled to the resistor of the RC network.
In operation, the first comparator sets the flip-flop, which commences the discharging of the voltage across the capacitor, when the RC oscillatory signal exceeds the predetermined high threshold voltage, and the second comparator resets the flip-flop, which commences the charging of the voltage across the capacitor, when the RC oscillatory signal falls below the predetermined low threshold voltage. In this manner, the signal appearing across the capacitor approximately oscillates between the high and low threshold voltages at a frequency determined by the value of the resistor and capacitor of the RC network.
However, such a configuration suffers from the drawback that by the time the flip-flop is set (or reset) in response to the switching of one of the comparators, the RC oscillatory signal has actually risen above the high threshold voltage (in the case of setting the flip-flop) or has fallen below the low threshold voltage (in the case of resetting the flip-flop). As a result, variations in the frequency of oscillation occur because the RC oscillatory signal does not accurately oscillate between the desired high and low threshold voltages. Such error can be unacceptable when an accurate oscillatory signal is required.
U.S. Pat. No. 4,122,413 to Chen (the "Chen '413 patent") discloses a single pin MOS RC oscillator circuit for oscillating between two threshold levels whose difference remains substantially constant. The RC oscillator circuit includes an external resistor and capacitor connected in series across power supply terminals of an integrated circuit (IC). The IC controls the charging and discharging of the capacitor. The IC is connected to the interconnection of the resistor and capacitor, and includes an MOS switch which is coupled across the capacitor. When the switch is on, the voltage across the capacitor will discharge through the MOS switch, and when the switch is off, the capacitor is charged through the resistor. The IC also includes a pair of inverters having similar but different threshold values, coupled between the resistor and capacitor. Logic circuitry of the IC is coupled to the pair of inverters and configured such that the switch is "off" as long as the capacitor voltage is below the threshold of both inverters, but the switch is "on" when the capacitor voltage exceeds both thresholds. Accordingly, the Chen '413 patent teaches that the voltage across the capacitor will oscillate between the two threshold voltages of the inverters at a frequency set by the RC time constant of the RC network. However, as stated in the Chen '413 patent, the threshold voltages of the inverters are not precise and will vary. However, the threshold voltages will vary in the same direction so that the difference between the threshold voltages will remain substantially constant. Accordingly, the frequency of oscillation remains substantially constant.
It is a principal object of the present invention to provide an RC oscillator circuit for providing a signal that oscillates at a predetermined frequency by accurately oscillating between precise high and low threshold voltage values while being substantially independent of temperature and power supply variations.